package controllers.midas;

import javax.inject.Inject;

import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;

import controllers.Secure;
import play.mvc.*;
import services.midas.MidasStubIntf;

@With(Secure.class)
public class Common extends Controller {
	
	@Inject
	static MidasStubIntf serviceStub;

    public static void search() {
        //render();
    }

    public static void checkReleaseAndBuild(String release,String build){
    	JSONObject json = null;
    	try {
			json = serviceStub.getReleaseAndBuild(release, build);
		} catch (JSONException e) {
			e.printStackTrace();
		}
    	
    	renderJSON(json != null ? json.toString() : "{}");
    }
}
